package org.cn.lennon.mybatis.factory;

public class DefaultObjectFactory {

	public static Object create(Class<?> type) {
		if(type != null) {
			try {
				return type.newInstance();
			} catch (InstantiationException e) {
				e.printStackTrace();
			} catch (IllegalAccessException e) {
				e.printStackTrace();
			}
		}
		throw new RuntimeException("创建对象报错！");
	}
}
